package com.zsc.wxm.ysh.anjo.service.base.enums.resources;

import lombok.Getter;

/**
 * 描述： 朝向：东、南、西、北
 *
 * @author playmaker
 * @since 2021/2/12 22:20
 */
@Getter
public enum TowardsType {

    /**
     * 朝向类型
     */
    EAST(1, "东"),
    SOUTH(2, "南"),
    WEAT(3, "西"),
    NORTH(4, "北"),
    OTHER(5, "其它")
    ;

    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String desc;

    TowardsType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getEnumDesc(int value) {
        for (TowardsType towardsType : TowardsType.values()) {
            if (towardsType.getValue() == value) {
                return towardsType.getDesc();
            }
        }
        return "";
    }



}
